Constants
Constants are created using a constant definition. Constant definitions also associate an identifier with a storage location in memory, but unlike variable declarations, a value is immediately assigned to the location. The value of the constant cannot be modified by a script after it is defined.
The general syntax for a constant definition is:
<identifier> = <value>;
Constants, unlike variables, do not require an explicit data type.
Constant definitions also occur at one location in the script, the CONST block. This area of the script is located at the beginning of the main program block, prior to both the main body of script code and the VAR block. The block is indicated by using the CONST keyword. Like the VAR block, the CONST block is the only location where this type of storage declaration (constant definitions) is allowed.
In the following example, constants are used to define values that could be used to customize the script for a specific target, such as a particular market:
 
LOCAL_GREETING_FRENCH = 'Bonjour ';
Once the value is defined, it can be used in the script as needed. Note again that no data type is required for constants; VectorScript will implicitly convert the value to the proper type if needed.
Constants can store any basic data type (INTEGER, LONGINT, REAL, STRING, CHAR, or BOOLEAN). VectorScript also supports the use of trigonometric, ordinal, and other mathematical functions in defining constants. The following table lists functions which are supported in the constant definition block and can be used to define constants in scripts.
 

Variables, Constants, and Data Types : Constants

Nemetschek NA
Phone: 410.290.5114
Fax: 410.290.8050